3.859 \(\int \frac{\sqrt{a+b x+c x^2}}{(d+e x) (f+g x)^2} \, dx\)

Optimal. Leaf size=490 \[ \frac{\sqrt{a e^2-b d e+c d^2} \tanh ^{-1}\left (\frac{-2 a e+x (2 c d-b e)+b d}{2 \sqrt{a+b x+c x^2} \sqrt{a e^2-b d e+c d^2}}\right )}{(e f-d g)^2}-\frac{e \sqrt{a g^2-b f g+c f^2} \tanh ^{-1}\left (\frac{-2 a g+x (2 c f-b g)+b f}{2 \sqrt{a+b x+c x^2} \sqrt{a g^2-b f g+c f^2}}\right )}{g (e f-d g)^2}+\frac{(2 c f-b g) \tanh ^{-1}\left (\frac{-2 a g+x (2 c f-b g)+b f}{2 \sqrt{a+b x+c x^2} \sqrt{a g^2-b f g+c f^2}}\right )}{2 g (e f-d g) \sqrt{a g^2-b f g+c f^2}}+\frac{\sqrt{a+b x+c x^2}}{(f+g x) (e f-d g)}-\frac{\sqrt{c} \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{g (e f-d g)}-\frac{(2 c d-b e) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 \sqrt{c} (e f-d g)^2}+\frac{e (2 c f-b g) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 \sqrt{c} g (e f-d g)^2} \]

[Out]

Sqrt[a + b*x + c*x^2]/((e*f - d*g)*(f + g*x)) - ((2*c*d - b*e)*ArcTanh[(b + 2*c*
x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*(e*f - d*g)^2) + (e*(2*c*f - b
*g)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*g*(e*f -
d*g)^2) - (Sqrt[c]*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(g*(e
*f - d*g)) + (Sqrt[c*d^2 - b*d*e + a*e^2]*ArcTanh[(b*d - 2*a*e + (2*c*d - b*e)*x
)/(2*Sqrt[c*d^2 - b*d*e + a*e^2]*Sqrt[a + b*x + c*x^2])])/(e*f - d*g)^2 + ((2*c*
f - b*g)*ArcTanh[(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*Sqrt[c*f^2 - b*f*g + a*g^2]*
Sqrt[a + b*x + c*x^2])])/(2*g*(e*f - d*g)*Sqrt[c*f^2 - b*f*g + a*g^2]) - (e*Sqrt
[c*f^2 - b*f*g + a*g^2]*ArcTanh[(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*Sqrt[c*f^2 -
b*f*g + a*g^2]*Sqrt[a + b*x + c*x^2])])/(g*(e*f - d*g)^2)

_______________________________________________________________________________________

Rubi [A]  time = 1.51042, antiderivative size = 490, normalized size of antiderivative = 1., number of steps used = 20, number of rules used = 7, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.241 \[ \frac{\sqrt{a e^2-b d e+c d^2} \tanh ^{-1}\left (\frac{-2 a e+x (2 c d-b e)+b d}{2 \sqrt{a+b x+c x^2} \sqrt{a e^2-b d e+c d^2}}\right )}{(e f-d g)^2}-\frac{e \sqrt{a g^2-b f g+c f^2} \tanh ^{-1}\left (\frac{-2 a g+x (2 c f-b g)+b f}{2 \sqrt{a+b x+c x^2} \sqrt{a g^2-b f g+c f^2}}\right )}{g (e f-d g)^2}+\frac{(2 c f-b g) \tanh ^{-1}\left (\frac{-2 a g+x (2 c f-b g)+b f}{2 \sqrt{a+b x+c x^2} \sqrt{a g^2-b f g+c f^2}}\right )}{2 g (e f-d g) \sqrt{a g^2-b f g+c f^2}}+\frac{\sqrt{a+b x+c x^2}}{(f+g x) (e f-d g)}-\frac{\sqrt{c} \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{g (e f-d g)}-\frac{(2 c d-b e) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 \sqrt{c} (e f-d g)^2}+\frac{e (2 c f-b g) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 \sqrt{c} g (e f-d g)^2} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[a + b*x + c*x^2]/((d + e*x)*(f + g*x)^2),x]

[Out]

Sqrt[a + b*x + c*x^2]/((e*f - d*g)*(f + g*x)) - ((2*c*d - b*e)*ArcTanh[(b + 2*c*
x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*(e*f - d*g)^2) + (e*(2*c*f - b
*g)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*g*(e*f -
d*g)^2) - (Sqrt[c]*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(g*(e
*f - d*g)) + (Sqrt[c*d^2 - b*d*e + a*e^2]*ArcTanh[(b*d - 2*a*e + (2*c*d - b*e)*x
)/(2*Sqrt[c*d^2 - b*d*e + a*e^2]*Sqrt[a + b*x + c*x^2])])/(e*f - d*g)^2 + ((2*c*
f - b*g)*ArcTanh[(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*Sqrt[c*f^2 - b*f*g + a*g^2]*
Sqrt[a + b*x + c*x^2])])/(2*g*(e*f - d*g)*Sqrt[c*f^2 - b*f*g + a*g^2]) - (e*Sqrt
[c*f^2 - b*f*g + a*g^2]*ArcTanh[(b*f - 2*a*g + (2*c*f - b*g)*x)/(2*Sqrt[c*f^2 -
b*f*g + a*g^2]*Sqrt[a + b*x + c*x^2])])/(g*(e*f - d*g)^2)

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c*x**2+b*x+a)**(1/2)/(e*x+d)/(g*x+f)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 0.553012, size = 294, normalized size = 0.6 \[ \frac{2 \log (d+e x) \sqrt{e (a e-b d)+c d^2}-2 \sqrt{e (a e-b d)+c d^2} \log \left (2 \sqrt{a+x (b+c x)} \sqrt{e (a e-b d)+c d^2}+2 a e-b d+b e x-2 c d x\right )-\frac{\log (f+g x) (2 a e g-b (d g+e f)+2 c d f)}{\sqrt{g (a g-b f)+c f^2}}+\frac{(2 a e g-b (d g+e f)+2 c d f) \log \left (2 \sqrt{a+x (b+c x)} \sqrt{g (a g-b f)+c f^2}+2 a g-b f+b g x-2 c f x\right )}{\sqrt{g (a g-b f)+c f^2}}+\frac{2 \sqrt{a+x (b+c x)} (e f-d g)}{f+g x}}{2 (e f-d g)^2} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[a + b*x + c*x^2]/((d + e*x)*(f + g*x)^2),x]

[Out]

((2*(e*f - d*g)*Sqrt[a + x*(b + c*x)])/(f + g*x) + 2*Sqrt[c*d^2 + e*(-(b*d) + a*
e)]*Log[d + e*x] - ((2*c*d*f + 2*a*e*g - b*(e*f + d*g))*Log[f + g*x])/Sqrt[c*f^2
 + g*(-(b*f) + a*g)] - 2*Sqrt[c*d^2 + e*(-(b*d) + a*e)]*Log[-(b*d) + 2*a*e - 2*c
*d*x + b*e*x + 2*Sqrt[c*d^2 + e*(-(b*d) + a*e)]*Sqrt[a + x*(b + c*x)]] + ((2*c*d
*f + 2*a*e*g - b*(e*f + d*g))*Log[-(b*f) + 2*a*g - 2*c*f*x + b*g*x + 2*Sqrt[c*f^
2 + g*(-(b*f) + a*g)]*Sqrt[a + x*(b + c*x)]])/Sqrt[c*f^2 + g*(-(b*f) + a*g)])/(2
*(e*f - d*g)^2)

_______________________________________________________________________________________

Maple [B]  time = 0.029, size = 3162, normalized size = 6.5 \[ \text{output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c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g-2*c*f)/g*(x+f/g)+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2)-1/2/(d
*g-e*f)^2*e*ln((1/2*(b*g-2*c*f)/g+c*(x+f/g))/c^(1/2)+((x+f/g)^2*c+(b*g-2*c*f)/g*
(x+f/g)+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2))/c^(1/2)*b+1/(d*g-e*f)^2*e/g*ln((1/2*(b*g
-2*c*f)/g+c*(x+f/g))/c^(1/2)+((x+f/g)^2*c+(b*g-2*c*f)/g*(x+f/g)+(a*g^2-b*f*g+c*f
^2)/g^2)^(1/2))*c^(1/2)*f+1/(d*g-e*f)^2*e/((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*ln((2*
(a*g^2-b*f*g+c*f^2)/g^2+(b*g-2*c*f)/g*(x+f/g)+2*((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*
((x+f/g)^2*c+(b*g-2*c*f)/g*(x+f/g)+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2))/(x+f/g))*a-1/
(d*g-e*f)^2*e/g/((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*ln((2*(a*g^2-b*f*g+c*f^2)/g^2+(b
*g-2*c*f)/g*(x+f/g)+2*((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*((x+f/g)^2*c+(b*g-2*c*f)/g
*(x+f/g)+(a*g^2-b*f*g+c*f^2)/g^2)^(1/2))/(x+f/g))*b*f+1/(d*g-e*f)^2*e/g^2/((a*g^
2-b*f*g+c*f^2)/g^2)^(1/2)*ln((2*(a*g^2-b*f*g+c*f^2)/g^2+(b*g-2*c*f)/g*(x+f/g)+2*
((a*g^2-b*f*g+c*f^2)/g^2)^(1/2)*((x+f/g)^2*c+(b*g-2*c*f)/g*(x+f/g)+(a*g^2-b*f*g+
c*f^2)/g^2)^(1/2))/(x+f/g))*c*f^2

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\sqrt{c x^{2} + b x + a}}{{\left (e x + d\right )}{\left (g x + f\right )}^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)/((e*x + d)*(g*x + f)^2),x, algorithm="maxima")

[Out]

integrate(sqrt(c*x^2 + b*x + a)/((e*x + d)*(g*x + f)^2), x)

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)/((e*x + d)*(g*x + f)^2),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x**2+b*x+a)**(1/2)/(e*x+d)/(g*x+f)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(c*x^2 + b*x + a)/((e*x + d)*(g*x + f)^2),x, algorithm="giac")

[Out]

Exception raised: TypeError